
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-line"></use>
                    </svg>
                    <div class="name">line</div>
                    <div class="fontclass">#icon-line</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow"></use>
                    </svg>
                    <div class="name">arrow</div>
                    <div class="fontclass">#icon-arrow</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-rou"></use>
                    </svg>
                    <div class="name">肉</div>
                    <div class="fontclass">#icon-rou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-mima"></use>
                    </svg>
                    <div class="name">密码</div>
                    <div class="fontclass">#icon-mima</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fankui"></use>
                    </svg>
                    <div class="name">关闭</div>
                    <div class="fontclass">#icon-fankui</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-chenggong2icon"></use>
                    </svg>
                    <div class="name">成功</div>
                    <div class="fontclass">#icon-chenggong2icon</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-duigou"></use>
                    </svg>
                    <div class="name">对勾</div>
                    <div class="fontclass">#icon-duigou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-diaoliaoganza"></use>
                    </svg>
                    <div class="name">调料干杂</div>
                    <div class="fontclass">#icon-diaoliaoganza</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-circled-angle-downwards"></use>
                    </svg>
                    <div class="name">arrow</div>
                    <div class="fontclass">#icon-circled-angle-downwards</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-circled-angle-upwards"></use>
                    </svg>
                    <div class="name">arrow</div>
                    <div class="fontclass">#icon-circled-angle-upwards</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-lajitong"></use>
                    </svg>
                    <div class="name">垃圾桶</div>
                    <div class="fontclass">#icon-lajitong</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-kefu"></use>
                    </svg>
                    <div class="name">客服</div>
                    <div class="fontclass">#icon-kefu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xiaoxi"></use>
                    </svg>
                    <div class="name">消息</div>
                    <div class="fontclass">#icon-xiaoxi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-liangyouganhuo"></use>
                    </svg>
                    <div class="name">粮油、干货</div>
                    <div class="fontclass">#icon-liangyouganhuo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-niunairupin"></use>
                    </svg>
                    <div class="name">牛奶、乳品</div>
                    <div class="fontclass">#icon-niunairupin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-angle-b-copy"></use>
                    </svg>
                    <div class="name">实心箭头下</div>
                    <div class="fontclass">#icon-angle-b-copy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jianguo"></use>
                    </svg>
                    <div class="name">坚果</div>
                    <div class="fontclass">#icon-jianguo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-guanbi01"></use>
                    </svg>
                    <div class="name">下一个</div>
                    <div class="fontclass">#icon-guanbi01</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-huidaodingbu"></use>
                    </svg>
                    <div class="name">回到顶部</div>
                    <div class="fontclass">#icon-huidaodingbu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow1"></use>
                    </svg>
                    <div class="name">arrow</div>
                    <div class="fontclass">#icon-arrow1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gouxuan"></use>
                    </svg>
                    <div class="name">勾选</div>
                    <div class="fontclass">#icon-gouxuan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yanzhengma"></use>
                    </svg>
                    <div class="name">验证码</div>
                    <div class="fontclass">#icon-yanzhengma</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow-copy-copy"></use>
                    </svg>
                    <div class="name">arrow</div>
                    <div class="fontclass">#icon-arrow-copy-copy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dengluzhanghao"></use>
                    </svg>
                    <div class="name">登录-账号</div>
                    <div class="fontclass">#icon-dengluzhanghao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-12binggangaodian"></use>
                    </svg>
                    <div class="name">饼干糕点</div>
                    <div class="fontclass">#icon-12binggangaodian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gouxuan1"></use>
                    </svg>
                    <div class="name">勾选</div>
                    <div class="fontclass">#icon-gouxuan1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gouwuche2"></use>
                    </svg>
                    <div class="name">购物车2</div>
                    <div class="fontclass">#icon-gouwuche2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shoucangjia"></use>
                    </svg>
                    <div class="name">收藏夹</div>
                    <div class="fontclass">#icon-shoucangjia</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shangxin"></use>
                    </svg>
                    <div class="name">00000-伤心</div>
                    <div class="fontclass">#icon-shangxin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tiaoliao"></use>
                    </svg>
                    <div class="name">调料</div>
                    <div class="fontclass">#icon-tiaoliao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow2"></use>
                    </svg>
                    <div class="name">arrow</div>
                    <div class="fontclass">#icon-arrow2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-cha"></use>
                    </svg>
                    <div class="name">茶</div>
                    <div class="fontclass">#icon-cha</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fangbianshipin"></use>
                    </svg>
                    <div class="name">方便食品</div>
                    <div class="fontclass">#icon-fangbianshipin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fa-headphones"></use>
                    </svg>
                    <div class="name">笑脸</div>
                    <div class="fontclass">#icon-fa-headphones</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xiayiye"></use>
                    </svg>
                    <div class="name">下一页</div>
                    <div class="fontclass">#icon-xiayiye</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tab_potato_heighlight"></use>
                    </svg>
                    <div class="name">猫豆</div>
                    <div class="fontclass">#icon-tab_potato_heighlight</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
